Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@opentelemetry/context-zone
Advanced tools
This module provides Zone Context Manager with bundled zone-js for Web applications. If you have your own zone-js please use @opentelemetry/context-zone-peer-dep If you use Angular it means you already have the zone-js and you should use @opentelemetry/context-zone-peer-dep
npm install --save @opentelemetry/context-zone
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
import { ZoneContextManager } from '@opentelemetry/context-zone';
const webTracerWithZone = new WebTracer({
contextManager: new ZoneContextManager()
});
webTracerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
// Example how the ZoneContextManager keeps the reference to the correct context during async operations
const span1 = webTracerWithZone.startSpan('foo1');
webTracerWithZone.withSpan(span1, () => {
console.log('Current span is span1', webTracerWithZone.getCurrentSpan() === span1);
setTimeout(() => {
const span2 = webTracerWithZone.startSpan('foo2');
console.log('Current span is span1', webTracerWithZone.getCurrentSpan() === span1);
webTracerWithZone.withSpan(span2, () => {
console.log('Current span is span2', webTracerWithZone.getCurrentSpan() === span2);
setTimeout(() => {
console.log('Current span is span2', webTracerWithZone.getCurrentSpan() === span2);
}, 500);
});
// there is a timeout which still keeps span2 active
console.log('Current span is span2', webTracerWithZone.getCurrentSpan() === span2);
}, 500);
console.log('Current span is span1', webTracerWithZone.getCurrentSpan() === span1);
});
Apache 2.0 - See LICENSE for more information.
0.12.0
opentelemetry-api
, opentelemetry-exporter-collector-grpc
, opentelemetry-exporter-collector-proto
, opentelemetry-exporter-collector
, opentelemetry-exporter-prometheus
, opentelemetry-metrics
opentelemetry-api
, opentelemetry-core
, opentelemetry-plugin-http
, opentelemetry-plugin-https
, opentelemetry-shim-opentracing
opentelemetry-resource-detector-aws
, opentelemetry-resources
opentelemetry-api
, opentelemetry-core
, opentelemetry-plugin-fetch
, opentelemetry-plugin-xml-http-request
opentelemetry-core
, opentelemetry-tracing
opentelemetry-exporter-prometheus
opentelemetry-core
, opentelemetry-exporter-prometheus
, opentelemetry-metrics
, opentelemetry-sdk-node
, opentelemetry-tracing
opentelemetry-api
, opentelemetry-exporter-collector-grpc
, opentelemetry-exporter-collector-proto
, opentelemetry-exporter-collector
, opentelemetry-exporter-prometheus
, opentelemetry-metrics
opentelemetry-core
, opentelemetry-tracing
opentelemetry-instrumentation
opentelemetry-core
opentelemetry-exporter-prometheus
opentelemetry-api
, opentelemetry-core
, opentelemetry-exporter-collector-proto
, opentelemetry-exporter-collector
, opentelemetry-exporter-jaeger
, opentelemetry-exporter-prometheus
, opentelemetry-exporter-zipkin
, opentelemetry-metrics
, opentelemetry-tracing
opentelemetry-api
, opentelemetry-core
, opentelemetry-node
, opentelemetry-plugin-http
, opentelemetry-plugin-https
, opentelemetry-shim-opentracing
, opentelemetry-tracing
opentelemetry-node
, opentelemetry-sdk-node
opentelemetry-exporter-collector
, opentelemetry-exporter-jaeger
, opentelemetry-exporter-zipkin
, opentelemetry-grpc-utils
, opentelemetry-plugin-grpc-js
, opentelemetry-plugin-grpc
, opentelemetry-plugin-http
, opentelemetry-plugin-https
x-opentelemetry-outgoing-request
header #1547 (@vmarchaud)opentelemetry-api
, opentelemetry-instrumentation
, opentelemetry-node
opentelemetry-api
, opentelemetry-tracing
opentelemetry-resource-detector-aws
, opentelemetry-resources
opentelemetry-node
opentelemetry-resources
, opentelemetry-sdk-node
opentelemetry-api
, opentelemetry-context-async-hooks
, opentelemetry-context-base
, opentelemetry-context-zone-peer-dep
, opentelemetry-core
, opentelemetry-shim-opentracing
, opentelemetry-tracing
, opentelemetry-web
opentelemetry-exporter-zipkin
opentelemetry-exporter-collector-grpc
, opentelemetry-exporter-collector-proto
, opentelemetry-exporter-collector
, opentelemetry-exporter-jaeger
, opentelemetry-exporter-prometheus
, opentelemetry-exporter-zipkin
, opentelemetry-metrics
, opentelemetry-plugin-fetch
, opentelemetry-plugin-xml-http-request
, opentelemetry-tracing
opentelemetry-plugin-http
opentelemetry-metrics
opentelemetry-plugin-http
, opentelemetry-plugin-https
opentelemetry-context-async-hooks
opentelemetry-exporter-collector-grpc
, opentelemetry-exporter-collector-proto
opentelemetry-exporter-collector-proto
, opentelemetry-exporter-collector
opentelemetry-resource-detector-aws
, opentelemetry-resources
opentelemetry-exporter-zipkin
FAQs
OpenTelemetry Context Zone
The npm package @opentelemetry/context-zone receives a total of 184,825 weekly downloads. As such, @opentelemetry/context-zone popularity was classified as popular.
We found that @opentelemetry/context-zone demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.